-- GENERATED SPELL FOR [Injured Warsong Engineer] --


function spell0_27110(pUnit, Event) --@Goblin Dragon Gun,Self--
pUnit:FullCastSpellOnTarget(44273,pUnit)
pUnit:RegisterEvent('Sorts_27110', 662, 1)
end

function spell1_27110(pUnit, Event) --@Soldier Rescued,n/a--
pUnit:FullCastSpellOnTarget(47968,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27110', 595, 1)
end

function spell2_27110(pUnit, Event) --@Super Shrink Ray,n/a--
pUnit:FullCastSpellOnTarget(22742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27110', 20343, 1)
end

function spell3_27110(pUnit, Event) --@Tune Up!,n/a--
pUnit:FullCastSpellOnTarget(47969,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27110', 581, 1)
end

function Sorts_27110(pUnit, Event)
local choix_sorts_27110 = math.random(0, 3)
if choix_sorts_27110 == 0 then
pUnit:RegisterEvent('spell0_27110', 1, 1)
end
if choix_sorts_27110 == 1 then
pUnit:RegisterEvent('spell1_27110', 1, 1)
end
if choix_sorts_27110 == 2 then
pUnit:RegisterEvent('spell2_27110', 1, 1)
end
if choix_sorts_27110 == 3 then
pUnit:RegisterEvent('spell3_27110', 1, 1)
end
end

function mob27110_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27110', math.random(1500, 3000), 1)
end

function mob27110_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27110_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27110_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27110, 1, 'mob27110_Action')
RegisterUnitEvent(27110, 2, 'mob27110_Leave')
RegisterUnitEvent(27110, 3, 'mob27110_Kill')
RegisterUnitEvent(27110, 4, 'mob27110_Die')
